package com.entity.enums;

/***
 * 类描述: 顾客会员卡日志类型枚举
 *
 * @author jack
 * @date 17/03/2017
 */
public enum CustomerVipCardLogTypeEnum {
    //状态 0 消费  1充值  2换卡 3门店卡维护 4门店特殊折扣维护 5退款

    COST(0),
    RECHARGE(1),
    CHANGE_CARD(2),
    SHOP_CARD_MANAGE(3),
    SHOP_SPECIAL_DISCOUNT_MANAGE(4),
    REFUND(5);

    int value;

    CustomerVipCardLogTypeEnum(int value) {
        this.value = value;
    }

    public int getValue() {
        return value;
    }

    public static String getDesp(Integer value) {
        if(value == null){
            return "";
        }
        if (value == COST.getValue()) {
            return "消费";
        }
        if (value == RECHARGE.getValue()) {
            return "充值";
        }
        if (value == CHANGE_CARD.getValue()) {
            return "换卡";
        }
        if (value == SHOP_CARD_MANAGE.getValue()) {
            return "门店卡维护";
        }
        if (value == SHOP_SPECIAL_DISCOUNT_MANAGE.getValue()) {
            return "门店特殊折扣维护";
        }
        if (value == REFUND.getValue()) {
            return "退款";
        }
        return "";
    }

    public static String getFrontDesp(Integer value) {
        if (value == null) {
            return "";
        }
        if (value == COST.getValue()) {
            return "交易使用";
        }
        if (value == RECHARGE.getValue()) {
            return "交易获得";
        }
        if (value == REFUND.getValue()) {
            return "退款";
        }
        return "";
    }

}
